home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qbsnip.zip / MICE.BAS < prev    next >
BASIC Source File  |  1997-06-20  |  945b  |  46 lines

  1. 'Determine Mouse Type
  2. 'by Martijn van de Streek
  3. 'March 5, 1997
  4.  
  5. 'Here's a program determining
  6. '1. What IRQ the mouse uses
  7. '2. The type of mouse (Serial, PS/2, etc)
  8. '3. The driver version
  9.  
  10. REM $INCLUDE: 'qb.bi'
  11.  
  12. DIM Reg AS RegType
  13. DIM Types$(5)
  14. DIM Type2$(7)
  15.  
  16. PRINT
  17. Types$(1) = "Bus"
  18. Types$(2) = "Serial"
  19. Types$(3) = "InPort"
  20. Types$(4) = "PS/2"
  21. Types$(5) = "HP"
  22.  
  23. Type2$(0) = "PS/2 Port"
  24. Type2$(2) = "IRQ 2"
  25. Type2$(3) = "IRQ 3"
  26. Type2$(4) = "IRQ 4"
  27. Type2$(5) = "IRQ 5"
  28. Type2$(6) = "IRQ 6"
  29. Type2$(7) = "IRQ 7"
  30.  
  31. CALL INTERRUPT(&H33, Reg, Reg)
  32. Reg.AX = &H24
  33. CALL INTERRUPT(&H33, Reg, Reg)
  34. IF Reg.AX <> &HFFFF THEN
  35.                 BH = (Reg.BX AND &HFF00) / 256
  36.                 BL = (Reg.BX AND &HFF)
  37.                 CH = (Reg.CX AND &HFF00) / 256
  38.                 CL = (Reg.CX AND &HFF)
  39.                 PRINT "Driver version: "; BH; "."; BL
  40.                 PRINT "Mouse Type:     "; Types$(CH)
  41.                 PRINT "IRQ #:          "; Type2$(CL)
  42. ELSE
  43.                 PRINT "An error occured !"
  44. END IF
  45.  
  46.